<?php /* Smarty version Smarty-3.1.18, created on 2015-07-07 14:39:54
         compiled from "D:\WWW\yf_qiaqia\Admin\View\Sys\smtp.html" */ ?>
<?php /*%%SmartyHeaderCode:3574559b743a24b034-16155025%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '14a66df6eaa7866cc53b5074e2b750b35ff7a757' => 
    array (
      0 => 'D:\\WWW\\yf_qiaqia\\Admin\\View\\Sys\\smtp.html',
      1 => 1436251116,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '3574559b743a24b034-16155025',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    '_C' => 0,
    'setting' => 0,
    '_L' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_559b743a498e49_04420431',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_559b743a498e49_04420431')) {function content_559b743a498e49_04420431($_smarty_tpl) {?><!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
css/amazeui.min.css" />
		<link rel="stylesheet" type="text/css" href="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
css/hy.admin.css" />
	</head>

	<body>
		<div class="am-g">
			<?php echo $_smarty_tpl->getSubTemplate ('../Common/hy_header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

			<div class="am-u-md-8 am-u-end">
				<form class="am-form am-form-horizontal hy-js-form">
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">发送email方式</label>
						<div class="am-u-sm-9">
							<div class="am-btn-group" data-am-button="">
								<label class="am-btn am-btn-default am-btn-xs  <?php if ($_smarty_tpl->tpl_vars['setting']->value['email_type']) {?><?php if ($_smarty_tpl->tpl_vars['setting']->value['email_type']==1) {?> am-active<?php } else { ?><?php }?><?php } else { ?> am-active<?php }?>">
									<input type="radio" name="email_type" value="1" <?php if ($_smarty_tpl->tpl_vars['setting']->value['email_type']) {?><?php if ($_smarty_tpl->tpl_vars['setting']->value['email_type']==1) {?> checked="checked" <?php } else { ?><?php }?><?php } else { ?> checked="checked" <?php }?> id="option1"> 第三方SMTP
								</label>
								<label class="am-btn am-btn-default am-btn-xs  <?php if ($_smarty_tpl->tpl_vars['setting']->value['email_type']==2) {?>am-active<?php } else { ?><?php }?>">
									<input type="radio" name="email_type" <?php if ($_smarty_tpl->tpl_vars['setting']->value['email_type']==2) {?> checked="checked" <?php } else { ?><?php }?> value="2" id="option2">服务器内置SMTP
								</label>
							</div>
						</div>
					</div>
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">SMTP服务器地址</label>
						<div class="am-u-sm-9">
							<input type="text" name="smtp" value="<?php echo $_smarty_tpl->tpl_vars['setting']->value['smtp'];?>
" placeholder="如:smtp.qq.com">
						</div>
					</div>
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">账户名</label>
						<div class="am-u-sm-9">
							<input type="text" name="smtp_username" value="<?php echo $_smarty_tpl->tpl_vars['setting']->value['smtp_username'];?>
">
						</div>
					</div>
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">密码</label>
						<div class="am-u-sm-9">
							<input type="password" name="smtp_password" value="<?php echo $_smarty_tpl->tpl_vars['setting']->value['smtp_password'];?>
">
						</div>
					</div>
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">邮件发送地址</label>
						<div class="am-u-sm-9">
							<input type="text" name="smtp_email" value="<?php echo $_smarty_tpl->tpl_vars['setting']->value['smtp_email'];?>
" placeholder="如：admin@qq.com">
						</div>
					</div>
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">测试邮件地址</label>
						<div class="am-u-sm-9">
							<input type="text" class="test_email" value="" placeholder="如：admin@qq.com">
						</div>
					</div>
					<div class="am-form-group">
						<div class="am-u-sm-9 am-u-sm-push-3">
							<button type="button" class="am-btn am-btn-primary hy-js-submit"><?php echo $_smarty_tpl->tpl_vars['_L']->value['SAVE'];?>
</button>
							<button type="button" class="am-btn am-btn-primary hy-js-testemail">发送测试邮件</button>
						</div>
					</div>
				</form>
			</div>
		</div>
		<?php echo $_smarty_tpl->getSubTemplate ('../Common/hy_footer.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

		<script type="text/javascript">
		$('.hy-js-testemail').click(function(e){
			e.preventDefault();
			var smtp=$('input[name=smtp]').val();
			var smtp_username=$('input[name=smtp_username]').val();
			var smtp_password=$('input[name=smtp_password]').val();
			var smtp_email=$('input[name=smtp_email]').val();
			var test_email=$('input.test_email').val();
			
			$.post('index.php?g=admin&m=sys&a=testemail',{ smtp:smtp,smtp_username:smtp_username,smtp_password:smtp_password,smtp_email:smtp_email,test_email:test_email},function(result){
				showMsg(result.content,result.error);
			},'json')
		})
			   hy_submit('index.php?g=admin&m=sys&a=saveSetting');
		</script>
	</body>

</html><?php }} ?>
